package com.zking.web.ly;

import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.zking.dao.domain.Resume;
import com.zking.service.ly.Preview2Service;

@Controller
public class Preview2Controller {
	@Autowired
	private Preview2Service ps;
	
	@RequestMapping(value = "/selectsly2")
	public ModelAndView selects2(Integer id, HttpServletRequest request) {
		System.out.println("id:"+id);
		ModelAndView modelAndView = new ModelAndView();
		Resume rs = ps.selec2(id);
		System.out.println("mr2:"+rs);
		if (rs != null) {
			modelAndView.addObject("mr2", rs);
			modelAndView.setViewName("preview2");
		}else {
			System.out.println("无数据");
		}
		return modelAndView;
	}
}
